<%-- 
    Document   : edit_student
    Created on : Dec 10, 2011, 4:07:35 PM
    Author     : THIENSUHACK
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<% request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 
%>

<%@page import="java.util.LinkedList"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="GetData.DataWS"%>
<%@page import="DTO.sinhvien"%>

<%
DataWS a=new DataWS();
dktc_ws.Sinhvien sv=new dktc_ws.Sinhvien();
sv=a.laymotsinhvien(request.getParameter("id"));
%>
<script language="javascript">   
        function enable()
        {
        //document.form1.matkhau.disabled=false;
        var pass=document.getElementById('matkhau');
         var pass2=document.getElementById('matkhau2');
        pass.disabled=false;    
        pass2.disabled=false;
        }           
</script>
<div>
<form name="form1" action="" method="post">
    <table>
        <tr> 
            <td></td><td><input type="hidden" name="masv" value="<%=sv.getMasv() %>" /></td>
        </tr>
        <tr> 
            <td>HỌ TÊN:</td><td> <input type="text" name="hoten" value="<%=sv.getHoten() %>"  /></td>
        </tr>
        <tr> 
            <td>GIỚi TÍNH:</td>
            <td> 
                <select name="gioitinh">
                    <%if(sv.getGioitinh()>0) { %>                    
                    <option value="1" selected="true">Nam</option>
                    <option value="0">Nữ</option>
                    <% } else { %>
                    <option value="1">Nam</option>
                    <option value="0" selected="true">Nữ</option>
                    <% } %>
                </select>
            </td>
        </tr>
        <tr> 
            <td>NGÀY SINH :</td><td> <input type="text" name="ngaysinh" value="<%=sv.getNgaysinh() %>" /></td>
        </tr>
        <tr> 
            <td>EMAIL :</td><td> <input type="text" name="email" value="<%=sv.getEmail()  %>" /></td>
        </tr>
        <tr> 
            <td>ĐIỆN THOẠI LIÊN HỆ :</td><td> <input type="text" name="phone" value="<%=sv.getPhone() %>" /></td>
        </tr>
        <tr> 
            <td>MẬT KHẨU:</td><td> <input type="password" id="matkhau"  name="matkhau" value="<%=sv.getMatkhau() %>" disabled="disabled" /></td>
        </tr>
        <tr> 
            <td>XÁC NHẬN LẠI MẬT KHẨU :</td><td> <input type="password" id="matkhau2" name="matkhau2" value="<%=sv.getMatkhau() %>" disabled="disabled"/></td><td><a href="javascript:enable();" >Thay đổi password?</a></td>
        </tr>
        <tr> 
            <td>ĐỊA CHỈ:</td><td> <input type="text" name="diachi" value="<%=sv.getDiachi() %>" /></td>
        </tr>
        <tr> 
            <td>KÍCH HOẠT TÀI KHOẢN :<%=sv.getTrangthai() %></td>
            <td>                 
                <select name="trangthai">
                    <%if(sv.getTrangthai()>0) { %>                    
                    <option value="1" selected="true">Kích Hoạt</option>
                    <option value="0">Bỏ Kích Hoạt</option>
                    <% } else { %>
                    <option value="1">Kích Hoạt</option>
                    <option value="0" selected="true">Bỏ Kích Hoạt</option>
                    <% } %>
                </select>
            </td>
        </tr>
    <tr> 
            <td></td><td>  <input type="submit" name="editstudent123" value="Cập Nhật"/></td>
        </tr>   
    </table>
</form>
</div>